package com.ruoyi.web.controller;

import cn.hutool.core.io.FileUtil;

import java.io.File;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
    /*    List<String> strings = FileUtil.readLines(new File("C:\\Users\\hxyas\\Desktop\\common-market.log" ), "utf-8" );
        List<String> newString = new ArrayList<>();
        for (String string : strings) {
            if (string.startsWith("2025-09-04" )) {
                newString.add(string);

            }
        }
        FileUtil.writeUtf8Lines(newString, "C:\\Users\\hxyas\\Desktop\\common-market1.log" );*/
        a();
    }


    public static void  a() {
        List<String> strings = FileUtil.readLines(new File("C:\\Users\\hxyas\\Desktop\\common-market1.log" ), "utf-8" );
        Set<String> s = new HashSet<>();
        for (String string : strings) {
//            2025-09-04 00:00:00
            String substring = string.substring(20);
            s.add(substring);
        }
        for (String string : s) {
            System.out.println(string);
        }
    }
}
